

<script type='text/javascript'>
/*
$(document).ready(function() {
	var date = new Date();
	var d = date.getDate();
	var m = date.getMonth();
	var y = date.getFullYear();
	
	$('#calendar').fullCalendar({
		header: {
			left: 'prev,next today',
			center: 'title',
			right: 'month,agendaWeek,agendaDay'
		},
		editable: true,
		events: [
			{
				title: 'All Day Event',
				start: new Date(y, m, 1)
			},
			{
				title: 'Long Event',
				start: new Date(y, m, d-5),
				end: new Date(y, m, d-2)
			},
			{
				id: 999,
				title: 'Repeating Event',
				start: new Date(y, m, d-3, 16, 0),
				allDay: false
			},
			{
				id: 999,
				title: 'Repeating Event',
				start: new Date(y, m, d+4, 16, 0),
				allDay: false
			},
			{
				title: 'Meeting',
				start: new Date(y, m, d, 10, 30),
				allDay: false
			},
			{
				title: 'Lunch',
				start: new Date(y, m, d, 12, 0),
				end: new Date(y, m, d, 14, 0),
				allDay: false
			},
			{
				title: 'Birthday Party',
				start: new Date(y, m, d+1, 19, 0),
				end: new Date(y, m, d+1, 22, 30),
				allDay: false
			},
			{
				title: 'Click for Google',
				start: new Date(y, m, 28),
				end: new Date(y, m, 29),
				url: 'http://google.com/'
			}
		]
	});
});
*/
$(document).ready(function() {
	//var date = new Date();
	//var d = date.getDate();
	//var m = date.getMonth();
	//var y = date.getFullYear();
		
	var calendar = $('#calendar').fullCalendar({
		header: {
			left: 'prev,next today',
			center: 'title',
			right: 'month,agendaWeek,agendaDay'
		},
		selectable: true,
		selectHelper: true,
		select: function(start, end, allDay) {
		
			if(true) {
				calendar.fullCalendar('renderEvent', {
					title: "zajęcia",
					start: start,
					end: end,
					allDay: allDay
				}, true // make the event "stick"
				);
			}
				
			calendar.fullCalendar('unselect');
		},
		editable: true,
		timeFormat: 'H(:mm)',
		axisFormat: 'H(:mm)',
		//defaultView : 'agendaWeek',
		firstDay: 1,
		dayClick: function() {
			$("#formAddSchedule").dialog();
		}
	});
});

</script>

<div id="calendar"></div>

<div id="formAddSchedule">
  <form id="form" name="form"><dl>
        <dt><label>Nazwa zadania</label></dt>
        <dd>
        	<input type="text" name="task" id="task" value="Nazwa Zadania" />
         </dd>

        <dt><label>Semestr</label></dt>
        <dd>
        	<select name="semester" id="semester" name="semester" class="validate[required]">
            	 <option value="" label="wybierz">wybierz</option>
            	<option value="semestr">semestr</option>
        	</select></dd>
        <dt><label>Przedmiot</label></dt>
        <dd><select name="subject" id="subject" class="validate[required]">
              <option value="" label="wybierz">wybierz</option>
               <option value="przedmiot">przedmiot</option>
        </select>
        </dd>
        <dt><label>Liczba godzin</label></dt>
        <dd><input type="text" name="numberHour" id="numberHour" value="" class="validate[required,minSize[1],maxSize[30],custom[onlyNumberSp]]"/>
         </dd>
        <dt><label>Liczba tygodni</label></dt>
        <dd><input type="text" name="numberWeek" id="numberWeek" value="" class="validate[required,minSize[1],maxSize[30],custom[onlyNumberSp]]"/>
         </dd>
        <dt><label>Wymiar tygodniowy</label></dt>
        <dd><input type="text" name="dimensionWeek" id="dimensionWeek" value="" class="validate[required,minSize[1],maxSize[30],custom[onlyNumberSp]]"/>
         </dd>
         </dl>
        <label>
              <span>Rodzaj zajęć</span>
        <select name="typeCourse" id="typeCourse" class="validate[required]" >
              <option value="" label="wybierz">wybierz</option>
             <option value="rodzajZajec">rodzaj zajec</option>
        </select>
        </label>
         <label>
          <span>Rodzaj zaliczenia</span>
        <select name="typeCredit" id="typeCredit" class="validate[required]">
              <option value="" label="wybierz">wybierz</option>
               <option value="rodzajZaliczenia">rodzaj zaliczenia</option>
        </select>
        </label>
        <label>
            <span>Wykładowca</span>
         <select name="user" id="user" class="validate[required]">
            <option value="" label="wybierz">wybierz</option>
            <option value="wykladowca">wykladowca</option>
         </select>
        </label>
        <label>
            <span>Specjalność</span>
        <select name="speciality" id="speciality" class="validate[required]">
             <option value="" label="wybierz">wybierz</option>
            <option value="specialnosc">specjalnosc</option>
        </select>
          </label>
         <label>
          <span>Rok</span>
        <select name="year" id="year" class="validate[required]">
              <option value="" label="wybierz">wybierz</option>
               <option value="rok">rok</option>
        </select>
        </label>
        <label>
            <span>Wymiar semestralny</span>
        <input type="text" name="dimensionSemester" id="dimensionSemester" value="" class="validate[required,minSize[1],maxSize[30],custom[onlyNumberSp]]"/>
         </label>
        <label>
          <span>Liczba godzin w roku</span>
        <input type="text" name="hourYear" id="hourYear" value="" class="validate[required,minSize[1],maxSize[30],custom[onlyNumberSp]]"/>
           </label>
        <label>
            <span>Liczba godzin w semestrze</span>
        <input type="text" name="hourSemester" id="hourSemester" value="" class="validate[required,minSize[1],maxSize[30],custom[onlyNumberSp]]"/>
         </label>

    <p><input type="submit" value="Dodaj zamówienie" id="acceptOrder" name="acceptOrder"/></p>
    
    
    </form>
 <p><input type="submit" value="Anuluj zamówienie" id="cancelOrder" /></p>
</div>